#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    connect(this, &mysignal, this, &Widget::handlClick);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
   emit mysignal("把参数设置为1");
}
void Widget::handlClick(const QString& text){
    this->setWindowTitle(text);
}

void Widget::on_pushButton_2_clicked()
{
    emit mysignal("把参数设置为2");
}
